package com.ayit.car.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 公告表
 * @TableName announcements
 */
@TableName(value ="announcements")
public class Announcements implements Serializable {
    /**
     * 公告ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 公告标题
     */
    private String title;

    /**
     * 公告详细内容
     */
    private String content;

    /**
     * 公告开始时间
     */
    private Date startDate;

    /**
     * 公告结束时间
     */
    private Date endDate;

    /**
     * 公告配图URL
     */
    private String imageUrl;

    /**
     * 目标车辆型号
     */
    private String targetVehicleModel;

    /**
     * 是否置顶，0-否，1-是
     */
    private Integer isPinned;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 公告ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 公告ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 公告标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 公告标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 公告详细内容
     */
    public String getContent() {
        return content;
    }

    /**
     * 公告详细内容
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 公告开始时间
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * 公告开始时间
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * 公告结束时间
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * 公告结束时间
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * 公告配图URL
     */
    public String getImageUrl() {
        return imageUrl;
    }

    /**
     * 公告配图URL
     */
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    /**
     * 目标车辆型号
     */
    public String getTargetVehicleModel() {
        return targetVehicleModel;
    }

    /**
     * 目标车辆型号
     */
    public void setTargetVehicleModel(String targetVehicleModel) {
        this.targetVehicleModel = targetVehicleModel;
    }

    /**
     * 是否置顶，0-否，1-是
     */
    public Integer getIsPinned() {
        return isPinned;
    }

    /**
     * 是否置顶，0-否，1-是
     */
    public void setIsPinned(Integer isPinned) {
        this.isPinned = isPinned;
    }

    /**
     * 创建时间
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 创建时间
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    /**
     * 更新时间
     */
    public Date getUpdatedAt() {
        return updatedAt;
    }

    /**
     * 更新时间
     */
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Announcements other = (Announcements) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getStartDate() == null ? other.getStartDate() == null : this.getStartDate().equals(other.getStartDate()))
            && (this.getEndDate() == null ? other.getEndDate() == null : this.getEndDate().equals(other.getEndDate()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
            && (this.getTargetVehicleModel() == null ? other.getTargetVehicleModel() == null : this.getTargetVehicleModel().equals(other.getTargetVehicleModel()))
            && (this.getIsPinned() == null ? other.getIsPinned() == null : this.getIsPinned().equals(other.getIsPinned()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
        result = prime * result + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getTargetVehicleModel() == null) ? 0 : getTargetVehicleModel().hashCode());
        result = prime * result + ((getIsPinned() == null) ? 0 : getIsPinned().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", content=").append(content);
        sb.append(", startDate=").append(startDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", targetVehicleModel=").append(targetVehicleModel);
        sb.append(", isPinned=").append(isPinned);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}